package com.future.hedongjun.mine.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.future.hedongjun.R;

import java.util.List;

/**
 * @author jniu
 * @Email niuxiaoqi@hztianque.com
 * @time 2018/11/25
 */
public class TimeLineAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
    public TimeLineAdapter(@Nullable List<String> data) {
        super(R.layout.recycler_item_logistics, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, String item) {
        int position = helper.getAdapterPosition();
        helper.setImageResource(R.id.iv_center, position == 0 ? R.drawable.wlxx_icon_dw : R.drawable.iv_timeline_circle);
        helper.setVisible(R.id.line_top, position != 0);
        helper.setVisible(R.id.line_bottom, position != (getItemCount() - 1));
        helper.setText(R.id.tv_time,"2018/11/11 11:11:11");
        helper.setText(R.id.tv_content,"这里是物流信息内容这里是物流信息内容这里是物流信息内容这里是物流信息内容");
    }
}
